Improve the pango trigger
authorMatthias Clasen <mclasen@redhat.com>
Sat, 25 Aug 2012 17:53:05 +0000 (13:53 -0400)
committerColin Walters <walters@verbum.org>
Sat, 25 Aug 2012 18:59:17 +0000 (14:59 -0400)
Use the new update-cache mode of pango-querymodules, which
automatically finds the correct cache file location.

Updated to look in both places by Colin Walters <walters@verbum.org>

https://bugzilla.gnome.org/show_bug.cgi?id=682411

src/triggers/triggers.d/0070pango.trigger

index ad41e7509ebe4c48b758cd34a642513a55b2083e..250d8960b213095abc9eddc7c00b7dd9d2cc7cde 100755 (executable)
 # Boston, MA 02111-1307, USA.
 
 if test -x "$(which pango-querymodules 2>/dev/null)"; then
-    DEST=/etc/pango/pango.modules
-    pango-querymodules --system > ${DEST}.tmp && mv ${DEST}.tmp ${DEST}
+    # Support both old and new pango-querymodules; see
+    # http://git.gnome.org/browse/pango/commit/?id=9bbb992671140b840bedb4339f6c326a2ae2c072
+    if ! pango-querymodules --system --update-cache; then
+       DEST=/etc/pango/pango.modules
+       pango-querymodules --system > ${DEST}.tmp && mv ${DEST}.tmp ${DEST}
+    fi
 fi